<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-Hans-CN">

<head>
<title>Update</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<!-- VENDOR CSS -->
<link rel="stylesheet"
	href="assets/vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet"
	href="assets/vendor/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/vendor/linearicons/style.css">
<!-- MAIN CSS -->
<link rel="stylesheet" href="assets/css/main.css">
<!-- FOR DEMO PURPOSES ONLY. You should remove this in your project -->
<link rel="stylesheet" href="assets/css/demo.css">
<!-- GOOGLE FONTS -->
<link
	href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700"
	rel="stylesheet">
<!-- ICONS -->
<link rel="apple-touch-icon" sizes="76x76"
	href="assets/img/apple-icon.png">
<link rel="icon" type="image/png" sizes="96x96"
	href="assets/img/favicon.png">
</head>

<body>
	<!-- WRAPPER -->
	<div id="wrapper">
		<!-- NAVBAR -->
		<nav class="navbar navbar-default navbar-fixed-top">
		<div class="brand">
			<a href="/bysjxt/queryNoticeByPage"><img src="assets/img/logo-dark.png"
				alt="Klorofil Logo" class="img-responsive logo"></a>
		</div>
		<div class="container-fluid">
			<div class="navbar-btn">
				<button type="button" class="btn-toggle-fullwidth">
					<i class="lnr lnr-arrow-left-circle"></i>
				</button>
			</div>
			<!-- TOP -->
			<%@ include file="top.jsp" %>
			<!-- END TOP -->
		</div>
		</nav>
		<!-- END NAVBAR -->
		<!-- LEFT SIDEBAR -->
		<%
		request.setCharacterEncoding("UTF-8");
		String sf="";
		sf = (String)request.getSession().getAttribute("sf");
		if(sf.equals("admin")) {
			%><%@ include file="nav-admin.jsp" %><%
		}else if(sf.equals("student")) {
			%><%@ include file="nav-student.jsp" %><%
		}else if(sf.equals("teacher")) {
			%><%@ include file="nav-teacher.jsp" %><%
		}
		%>
		<!-- END LEFT SIDEBAR -->
		<!-- MAIN -->
		<div class="main">
			<!-- MAIN CONTENT -->
			<div class="main-content">
				<div class="container-fluid">
					<h3 class="page-title">教师管理模块</h3>
					<div class="row">
						<!-- INPUTS -->
						<div class="panel">
							<div class="panel-heading">
								<h3 class="panel-title">修改教师信息<span style="color: red">${message}</span><br /></h3>
							</div>
							<%
							if(sf.equals("teacher")) {
							%>
							<!-- 表单用于提交数据  action="/EducationSystem/TeacherUpdate" -->
							<form action="/bysjxt/TeacherUpdate" method="post">
								<div class="panel-body">
									*教师ID：<input type="text" name="cTeacherID" class="form-control"
									readonly  unselectable="on" value="${UpdateTeacher.cTeacherID}"> <br> 
									 *教师姓名：<input type="text" name="cTeacherName" class="form-control"
									readonly  unselectable="on" value="${UpdateTeacher.cTeacherName}"> <br> 
									*密码：<input type="text" required name="cPassword" class="form-control"
									value="${UpdateTeacher.cPassword}"> <br> 
									*性别： <c:if test="${UpdateTeacher.cGenser=='男'}">
									<input name="cGenser" value="男" type="radio"checked="checked">
									<span>男</span><br><br></c:if>
									<c:if test="${UpdateTeacher.cGenser=='女'}">
									<input name="cGenser" value="女" type="radio"checked="checked">
									<span>女</span><br><br></c:if>
									*年龄：<input type="number" name="cAge" class="form-control" min="18" max="150"
									readonly  unselectable="on" value="${UpdateTeacher.cAge}"> <br>
									*所在系：<input type="text" name="cDeparterment" class="form-control"
									readonly  unselectable="on" value="${UpdateTeacher.cDeparterment}"> <br>
									 *所教学科：<input type="text" name="cObject" class="form-control"
									readonly  unselectable="on" value="${UpdateTeacher.cObject}"> <br> *学历：<input
									type="text" name="cDegree" readonly  unselectable="on" class="form-control"
									value="${UpdateTeacher.cDegree}"> <br> *职称：<input
									type="text" name="cJobs" readonly  unselectable="on" class="form-control"
									value="${UpdateTeacher.cJobs}"> <br> *研究方向：<input
									type="text" name="cDirection" readonly  unselectable="on" class="form-control"
									value="${UpdateTeacher.cDirection}"> <br>  E_mail：<input
									type="email" name="email" class="form-control"
									value="${UpdateTeacher.email}"> <br> 地址：<input
									type="text" name="vAddress" class="form-control"
									value="${UpdateTeacher.vAddress}"> <br> 固定电话：<input
									type="text" onkeyup="value=value.replace(/[^\d\-\d]/g,'')" 
									maxlength=20 name="cPhone" class="form-control"
									value="${UpdateTeacher.cPhone}"> <br> 手机：<input
									type="text" onkeyup="value=value.replace(/[^\d]/g,'')"  
									maxlength=11 name="cMobile" class="form-control"
									value="${UpdateTeacher.cMobile}"> <br> QQ：<input
									type="text" onkeyup="value=value.replace(/[^\d]/g,'')" name="QQ" class="form-control"
									value="${UpdateTeacher.QQ}"> <br> 工作性质：<input
									type="text" name="cNature" class="form-control"
									readonly  unselectable="on" value="${UpdateTeacher.cNature}"> <br>
									备注：<textarea name="cRemarks" class="form-control"
									placeholder="${UpdateTeacher.cRemarks}" rows="4"></textarea>
									<br> 
								</div>
								<div class="row">
									<div class="col-md-2"></div>

									<div class="col-md-4">
										<button type="submit" class="btn btn-success btn-block">提交</button>
									</div>

									<div class="col-md-4">
										<button type="reset" class="btn btn-danger btn-block">重置</button>
									</div>
									<div class="col-md-2"></div>
								</div>
							</form>
							<%
							}else if(sf.equals("admin")){
							%>
							<!-- 表单用于提交数据  action="/EducationSystem/TeacherUpdate" -->
							<form action="/bysjxt/TeacherUpdate" method="post">
								<div class="panel-body">
									*教师ID：<input type="text" name="cTeacherID" class="form-control"
									readonly  unselectable="on" value="${UpdateTeacher.cTeacherID}"> <br> 
									 *教师姓名：<input type="text" required name="cTeacherName" class="form-control"
										value="${UpdateTeacher.cTeacherName}"> <br> *密码：<input
										type="text" required name="cPassword" class="form-control"
										value="${UpdateTeacher.cPassword}"> <br> 
										*性别： <label class="fancy-radio"> <input
										name="cGenser" value="男" type="radio"
										<c:if test="${UpdateTeacher.cGenser=='男'}">checked="checked"</c:if>>
										<span><i></i>男</span>
										</label> <label class="fancy-radio"> <input name="cGenser"
										value="女" type="radio"
										<c:if test="${UpdateTeacher.cGenser=='女'}">checked="checked"</c:if>>
										<span><i></i>女</span> </label> <br>
										*年龄：<input type="number" required name="cAge" class="form-control" min="18" max="150"
										value="${UpdateTeacher.cAge}"> <br>
										*所在系：<input type="text" required name="cDeparterment" class="form-control"
										value="${UpdateTeacher.cDeparterment}"> <br> *所教学科：<input
										type="text" required name="cObject" class="form-control"
										value="${UpdateTeacher.cObject}"> <br> *学历：<input
										type="text" required name="cDegree" class="form-control"
										value="${UpdateTeacher.cDegree}"> <br> *职称：<input
										type="text" required name="cJobs" class="form-control"
										value="${UpdateTeacher.cJobs}"> <br> *研究方向：<input
										type="text" required name="cDirection" class="form-control"
										value="${UpdateTeacher.cDirection}"> <br>  E_mail：<input
										type="email" name="email" class="form-control"
										value="${UpdateTeacher.email}"> <br> 地址：<input
										type="text" name="vAddress" class="form-control"
										value="${UpdateTeacher.vAddress}"> <br> 固定电话：<input
										type="text" onkeyup="value=value.replace(/[^\d\-\d]/g,'')" 
										maxlength=20 name="cPhone" class="form-control"
										value="${UpdateTeacher.cPhone}"> <br> 手机：<input
										type="text" onkeyup="value=value.replace(/[^\d]/g,'')"  
										maxlength=11 name="cMobile" class="form-control"
										value="${UpdateTeacher.cMobile}"> <br> QQ：<input
										type="text" onkeyup="value=value.replace(/[^\d]/g,'')" name="QQ" class="form-control"
										value="${UpdateTeacher.QQ}"> <br> 工作性质：<input
										type="text" name="cNature" class="form-control"
										value="${UpdateTeacher.cNature}"> <br>
										备注：<textarea name="cRemarks" class="form-control"
										placeholder="${UpdateTeacher.cRemarks}" rows="4"></textarea>
									<br> 
								</div>
								<div class="row">
									<div class="col-md-2"></div>

									<div class="col-md-4">
										<button type="submit" class="btn btn-success btn-block">提交</button>
									</div>

									<div class="col-md-4">
										<button type="reset" class="btn btn-danger btn-block">重置</button>
									</div>
									<div class="col-md-2"></div>
								</div>
							</form>
							<%
							}
							%>
						</div>
						<!-- END INPUTS -->
					</div>
				</div>
			</div>
			<!-- END MAIN CONTENT -->
		</div>
		<!-- END MAIN -->
		<div class="clearfix"></div>
		<footer>
		<div class="container-fluid">
			<p class="copyright">
				Copyright &copy; 2020.GWNG.<a href="https://www-new.gwng.edu.cn/" target="_blank"
					title="广外南国">广外南国</a> - Made by <a
					href="https://www.baidu.com/" title="陆学嘉" target="_blank">陆学嘉</a>
			</p>
		</div>
		</footer>
	</div>
	<!-- END WRAPPER -->
	<!-- Javascript -->
	<script src="assets/vendor/jquery/jquery.min.js"></script>
	<script src="assets/vendor/bootstrap/js/bootstrap.min.js"></script>
	<script src="assets/vendor/jquery-slimscroll/jquery.slimscroll.min.js"></script>
	<script src="assets/scripts/klorofil-common.js"></script>
</body>

</html>